/*
 * Copyright 2007. Mount Sinai Hospital, Toronto, Canada.
 * 
 * Licensed under the GNU Lesser General Public License, Version 2. You
 * can find a copy of the license at:
 * 
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 * 
 * IN NO EVENT SHALL MOUNT SINAI HOSPITAL BE LIABLE TO ANY PARTY FOR DIRECT, 
 * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST 
 * PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, 
 * EVEN IF MOUNT SINAI HOSPITAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 
 * DAMAGE.
 * 
 * MOUNT SINAI HOSPITAL SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF 
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND 
 * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". 
 * MOUNT SINAI HOSPITAL HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 
 * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 
 */
package com.sinai.mshab.client.services;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sinai.mshab.client.util.AnswerCollection;
import com.sinai.mshab.client.ui.Key;

/**
 * This is the async version of the Service class.
 * 
 * @author serge
 * 
 */
public interface ServiceAsync {
	public void sendAnswer(AnswerCollection answer, Key key, AsyncCallback a);

	public void retrieveData(Key key, AsyncCallback a);

	public void validateLogin(String user, String pass, AsyncCallback a);

	public void resetPassword(String username, AsyncCallback a);

	public void getTables(AsyncCallback a);

	public void getColumnNames(AsyncCallback a);

	public void execteSQL(String sql, int start, int end, AsyncCallback a);

	public void validKey(Key k, AsyncCallback a);

	public void getSuggestions(String fieldName, String tableName,
			String types_so_far, AsyncCallback a);

	public void getUserPermission(String username, AsyncCallback a);

	public void authenticate(String username, String password, AsyncCallback a);
	
	public void storeFile(String fieldName, String tableName, Key dbKey,
			String filePath, AsyncCallback a);
}
